clang-fix-cmpxchg8-detection-on-i386
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 26 Apr 2017 21:13:02 +0000 (21:13 +0000)
committerRaspbian forward porter <root@raspbian.org>
Wed, 26 Apr 2017 21:13:02 +0000 (21:13 +0000)
commita9df43d648fc99d347c4659c0656e2cb971dc910
tree2a45111b492c8cfe98e5a1469a22aa12b6d23ea0
parentf7624cdff8b6b380d05b8324a26a88354c320d21
clang-fix-cmpxchg8-detection-on-i386

libcxx atomic tests for old i386 fail with wrong Atomic inline width.
cmpxchg8b instruction is required for 8 byte atomics that clang was
assuming.

Too bad _GCC_ATOMIC_LLONG_LOCK_FREE 2 isn't supported even with this change
because llvm doesn't support unaligned atomic compare and exchange operation.
Fallback calls to libatomic.so should handle long long lock free but clang
can't tell program if libatomic is always lock free.

Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355

Gbp-Pq: Name clang-fix-cmpxchg8-detection-on-i386.patch
clang/lib/Basic/Targets.cpp
clang/test/Sema/atomic-ops.c